<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>罗江区数据可视化平台</title>
    <link rel="stylesheet" href="./css/index.css">

</head>

<body>
    <header class="head">
        <h1>罗江区<span id="district"></span>数据可视化平台</h1>
        <div class="now_time"></div>
    </header>
    <section class="mainbox ">
        <div class="column">
            <div class="panel pie_age">
                <h3>危化品危险等级分类及数量</h3>
                <div class="chart"></div>
                <div class="panel_footer">
                </div>
            </div>
            <div class="panel line_staff">
                <h3 class="title">
                    火灾隐患历年分析走势
                </h3>
                <div class="chart"></div>
                <div class="panel_footer">
                </div>
            </div>
            <div class="panel bar_industry">
                <h3>各乡镇地灾隐患点数量
                </h3>
                <div class="chart"></div>
                <div class="panel_footer">
                </div>
            </div>
            
        </div>
        <div class="column">
            <div class="number">
                <ul class="num_hd" id="showNum">
                    <li>301</li>
                    <li>13</li>
                    <li>2</li>
                    <li>286</li>
                </ul>
                <div class="num_bd">
                    <span>安全隐患总数量</span>
                    <span>整改中数量</span>
                    <span>待整改数量</span>
                    <span>已整改数量</span>
                </div>
            </div>
            <div class="panel map">
                <div id="return-back" style="display: none; cursor: pointer;padding:10px;z-index: 99; color:#fff;font-size:12px;position:absolute;top:6%;right:4%;border:1px solid #02a6b5;border-radius:5px">返回上一级</div>
                <ul class="map-legend">
                    <!-- <li class="legend-rqzdxc">燃气重点巡查</li>
                    <li class="legend-hl">河流</li>
                    <li class="legend-sk">水库</li>
                    <li class="legend-shzh">山洪灾害</li>
                    <li class="legend-yhq">易洪区</li>
                    <li class="legend-sdz">水电站</li> -->
                </ul>
                <div class="map1"></div>
                <div class="map2"></div>
                <div class="map3"></div>
                <div class="chart"></div>
                <div class="panel_footer"></div>
            </div>
           <div class="panel chart">
                <h3>各行业安全隐患点排行</h3>
                <div id="safety-sort" class="chart"></div>
                <div class="panel_footer"></div>
           </div>
        </div>
        <div class="column">
            <div class="panel bar_skill">
                <h3>燃气公司重点巡查区域</h3>
                <div class="chart"></div>
                <div class="panel_footer">
                </div>
            </div>
            <div class="panel line_flow">
                <h3>河流最高水流量</h3>
                <div class="chart"></div>
                <div class="panel_footer"></div>
            </div>
            <div class="panel pie_area">
                <h3>平均空气质量</h3>
                <div class="chart"></div>
                <div class="panel_footer">
                </div>
            </div>
        </div>
    </section>
    <script type="text/javascript" src="/echarts/js/jquery.min.js"></script>
    <script type="text/javascript" src="/echarts/js/echarts.min.js"></script>
    <script src="/echarts/js/const.js"></script>
    <script src="./js/flexible.js"></script>
    <script src="./js/index.js"></script>
    <script>
        // 获取当前时间
        let timer = null;
        timer = setTimeout(time, 1000);
        function time() {
            clearTimeout(timer);
            let now = new Date();
            let y = now.getFullYear(),
                m = now.getMonth() + 1,
                d = now.getDate(),
                h = now.getHours(),
                minutes = now.getMinutes(),
                s = now.getSeconds();
            document.querySelector(".now_time").innerHTML = '当前时间: ' + y + '年' + m + '月' + d + '日 ' + h + '时' + minutes + '分' + s + '秒';
            timer = setTimeout(time, 1000);
        }

        let legends = [
            {color: window.colors.dzzh,name:'地质灾害'},
            {color: window.colors.rqzdxc,name:'燃气重点巡查'}, 
            {color: window.colors.sk,name:'水库'},
            {color: window.colors.sdz,name:'水电站'},
            {color: window.colors.shzh,name:'山洪灾害'},
            {color: window.colors.yhq, name:'易洪区'},
        ]
        let li = '';
        for(let legend of legends){
            li+=' <li> <i class="color-icon" style="background-color: '+ legend.color +';"></i>'+ legend.name +'</li>'
        }
        document.querySelector(".map-legend").innerHTML=li;
    </script>

</body>

</html>
